<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>jQuery UI Sortable - Connect lists</title>
    <!--link type="text/css" href="development-bundle/themes/base/jquery.ui.all.css" rel="stylesheet" /-->
    <!--link type="text/css" href="development-bundle/demos/demos.css" rel="stylesheet" /-->
    <link type="text/css" href="css/ui-lightness/jquery-ui-1.12.1.min.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-1.12.1.min.js"></script>
    <style type="text/css">
      #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; float: left; margin-right: 10px; }
      #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
    </style>
    <script type="text/javascript">
      $(function() {
          $("#sortable1, #sortable2").sortable({
            connectWith: '.connectedSortable'
            }).disableSelection();

          var report_event = function(report_text) {
            var reportElement = $("#dragging_reports");
            var origText = reportElement.text();
            reportElement.text(origText + " " + report_text);
          }

          $("#sortable2").droppable({
            out: function(event, ui) {
              report_event("DragOut");
            }
            });

          $("#sortable1").droppable({
            drop: function(event, ui) {
              report_event("DropIn " + ui.draggable.text());
            }
            });
          });
    </script>
  </head>
  <body>
    <div class="demo">
      <ul id="sortable1" class="connectedSortable">
        <li id="leftitem-1" class="ui-state-default">LeftItem 1</li>
        <li id="leftitem-2" class="ui-state-default">LeftItem 2</li>
        <li id="leftitem-3" class="ui-state-default">LeftItem 3</li>
        <li id="leftitem-4" class="ui-state-default">LeftItem 4</li>
        <li id="leftitem-5" class="ui-state-default">LeftItem 5</li>
      </ul>

      <ul id="sortable2" class="connectedSortable">
        <li id="rightitem-1" class="ui-state-highlight">RightItem 1</li>
        <li id="rightitem-2" class="ui-state-highlight">RightItem 2</li>
        <li id="rightitem-3" class="ui-state-highlight">RightItem 3</li>
        <li id="rightitem-4" class="ui-state-highlight">RightItem 4</li>
        <li id="rightitem-5" class="ui-state-highlight">RightItem 5</li>
      </ul>

    </div>

    <br/>
    <div class="test-data">
      <p id="dragging_reports">Nothing happened.</p>
    </div>

  </body>
</html>
